<?

JCAT_Package::ImportClass('JCAT_Controller',JCAT::PACKAGE_MVC) ;
JCAT_Package::ImportInterface('JCAT_IViewForm',JCAT::PACKAGE_MVC) ;

class DataVerifierDlg extends JCAT_GtkDialog implements JCAT_IViewForm
{
	/**
	 * what's this
	 * 
	 * @access	public
	 * @param	$aParent=null	JCAT_ViewGtk		拥有此视图的对象
	 * @param	$aUI=null		JCAT_UIGtkGlade		模版引擎
	 * @return	void
	 */
	public function DataVerifierDlg( JCAT_IViewContainer $aParent, JCAT_UIGtkGlade $aUI=null )
	{		
		$this->JCAT_GtkDialog('DataVerifierDlg','DataVerifierSettingView','DataVerifierDlg',$aParent) ;
		
		
		// 创建 并 初始化 UICtrl ---------------------------
		$aUICtrl = new JCAT_UIGtkCtrlCheckbox('IsEnable',JCAT_Language::Sentence('启用'),'ChkIsEnable') ;
		$aUICtrl->SetActiveValue(true) ;
		$this->AddUICtrl($aUICtrl) ;

		$aUICtrl = new JCAT_UIGtkCtrlCheckbox('VerifyLogic',JCAT_Language::Sentence('校验逻辑：符合'),'ChkVerifyLogic') ;
		$aUICtrl->SetActiveValue(true) ;
		$this->AddUICtrl($aUICtrl) ;
		
		// 设置数据交换
		$aDataExchanger = $this->GetDataExchanger() ;
		$aDataExchanger->LinkUICtrlToDocumentData('IsEnable','IsEnable') ;
		$aDataExchanger->LinkUICtrlToDocumentData('VerifyLogic','VerifyLogic') ;
	}

	/**
	 * 初始化 视图
	 *
	 * @access	public
	 * @return	void
	 */
	public function OnInitView()
	{
		// 窗口标题
		$aDoc = $this->GetDocument() ;
		JCAT_ASSERT::ASSERT_INSTANCE($aDoc,'IToolboxDataVerifierDoc') ;
		$this->SetTitle( call_user_func( array($aDoc->GetControllerName(),'GetVerifierName')) ) ;
	}

}

?>